import { axios } from '@/libs/api.request'

export const getCaptcha = () => {
  return axios.get('api/System/getCaptcha')
}

// #region 目录菜单

export const GetMenuTreeList = () => {
  return axios.get('api/System/GetMenuTreeList')
}
export const GetMenuList = () => {
  return axios.get('api/System/GetMenuList')
}

export const GetTenantMenuTreeList = () => {
  return axios.get('api/System/GetTenantMenuTreeList')
}

export const SaveMenu = form => {
  return axios.post('api/System/SaveMenu', form)
}
export const DeleteMenu = id => {
  return axios.post('api/System/DeleteMenu/' + id)
}
export const CopyMenu = id => {
  return axios.post('api/System/CopyMenu/' + id)
}

// #endregion

// #region 数据字典

export const GetDicType = () => {
  return axios.get('api/System/GetDicType')
}

export const SaveDicType = form => {
  return axios.post('api/System/SaveDicType', form)
}
export const DeleteDicType = id => {
  return axios.post('api/System/DeleteDicType/' + id)
}
export const SearchDicData = form => {
  return axios.post('api/System/SearchDicData', form)
}

export const SaveDicData = form => {
  return axios.post('api/System/SaveDicData', form)
}
export const DeleteDicData = id => {
  return axios.post('api/System/DeleteDicData/' + id)
}
// #endregion
// #region 费用类型

export const GetFeeType = sene => {
  return axios.get('api/System/GetFeeType/' + sene)
}
export const GetFeeTypeSimple = () => {
  return axios.get('api/System/GetFeeTypeSimple')
}

export const SaveFeeType = form => {
  return axios.post('api/System/SaveFeeType', form)
}
export const DeleteFeeType = id => {
  return axios.post('api/System/DeleteFeeType/' + id)
}
// #endregion
// #region 县区
export const GetCountyList = () => {
  return axios.get('api/System/GetCountyList')
}

export const SaveCounty = form => {
  return axios.post('api/System/SaveCounty', form)
}
export const DeleteCounty = id => {
  return axios.post('api/System/DeleteCounty/' + id)
}
// #endregion


// #region 乡镇
export const GetTownList = id => {
  return axios.get('api/System/GetTownList/'+id)
} 
export const SaveTown = form => {
  return axios.post('api/System/SaveTown', form)
}
export const DeleteTown = id => {
  return axios.post('api/System/DeleteTown/' + id)
}
// #endregion

// #region 文章
export const GetArticleList = () => {
  return axios.get('api/System/GetArticleList')
}

export const SaveArticle = form => {
  return axios.post('api/System/SaveArticle', form)
}
export const DeleteArticle = id => {
  return axios.post('api/System/DeleteArticle/' + id)
}
// #endregion


// #region 轮播图
export const GetCarouselList = () => {
  return axios.get('api/System/GetCarouselList')
}

export const SaveCarousel = form => {
  return axios.post('api/System/SaveCarousel', form)
}
export const DeleteCarousel = id => {
  return axios.post('api/System/DeleteCarousel/' + id)
}
// #endregion

// #region 单页
export const GetSinglePageList = () => {
  return axios.get('api/System/GetSinglePageList')
}

export const SaveSinglePage = form => {
  return axios.post('api/System/SaveSinglePage', form)
}
export const DeleteSinglePage = id => {
  return axios.post('api/System/DeleteSinglePage/' + id)
}
// #endregion

// #region app
export const GetAppInfoList = () => {
  return axios.get('api/System/GetAppInfoList')
}

export const SaveAppInfo = form => {
  return axios.post('api/System/SaveAppInfo', form)
}
export const DeleteAppInfo = id => {
  return axios.post('api/System/DeleteAppInfo/' + id)
}
// #endregion



// #region 大屏数据
export const GetBigData = () => {
  return axios.get('api/System/GetBigData')
}

export const SaveBigData = form => {
  return axios.post('api/System/SaveBigData', form)
}
 
// #endregion
